/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.elcom.dailyexpress.mongodbdao;

import com.elcom.emocbc.mongodb.Cell;
import com.google.code.morphia.Datastore;
import com.google.code.morphia.dao.BasicDAO;
import com.google.code.morphia.query.Query;
import java.util.List;
import org.bson.types.ObjectId;

/**
 *
 * @author GiangLT
 */
public class CellDao extends BasicDAO<Cell, ObjectId> {

    public CellDao(Datastore ds) {
        super(ds);
    }
    
    public List<Cell> findByBscId(String bscId) {
        Query<Cell> query = ds.createQuery(Cell.class);
        return query.field("bscId").equal(bscId).asList();
    }
}
